//
//  CallCenter.m
//  ZhumuSDKSample
//
//  Copyright 2006-2015 SUIRUI Co., Ltd. All rights reserved.
//

#import "CallCenter.h"


@implementation CallCenter

+(CallCenter *)sharedInsance
{
    static CallCenter *_sharedInstance = nil;
    static dispatch_once_t oncePredicate;
    dispatch_once(&oncePredicate, ^{
        _sharedInstance = [[CallCenter alloc] init];
    });
    return _sharedInstance;
}

-(void)startCallWithType:(CallType)type info:(Meeting *)info delegate:(id<ZhumuSDKMeetingServiceDelegate>)delegate success:(CALL_SUCCESS)success failure:(CALL_FAILURE)failure
{
    switch (type) {
        case Instant_CallType:
            [InstantCalling startCall:info delegate:delegate success:success failure:failure];
            break;
        case Join_CallType:
            [JoinCalling startCall:info delegate:delegate success:success failure:failure];
            break;
        case Scheduled_CallType:
            [ScheduledCalling startCall:info delegate:delegate success:success failure:failure];
            break;
        default:
            break;
    }
}

#if !__has_feature(objc_arc)
-(void)dealloc
{
    [super dealloc];
}
#endif

@end
